<form name="form1" action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="itemID" value="" />
<input type="hidden" name="mode" value="" />
<input type="hidden" name="type" value="" />
<table width="100%" border="0" cellpadding="5" cellspacing="2">
	<?php if (count ($this->errorArr) > 0) :?>
  	<tr>
  		<td width="100%"><?php echo FunctionCommon::showAllErrorMessage($this->errorArr);?></td>
  	</tr>
  	<?php endif;?>
  <tr>
     <td align="left" bgcolor="#FFFFCC"><span class="span-text">Tên :</span><br /><input type="text" size="50" name="name" id="name" value="<?php echo $this->arrField['name'];?>" /></td>
  </tr>
  <tr>
     <td align="left" bgcolor="#FFFFCC"><span class="span-text">Giá :</span><br /><input type="text" size="7" name="gia1" id="gia1" value="<?php echo $this->arrField['gia1'];?>" />.000 VNĐ</td>
  </tr>
  <tr>
  	<td bgcolor="#FFFFCC">
  		<?php if($this->arrField['check_km']=='1') :?>
		  	<style>
		  		span#giakhuyenmai{display:block;}
		  	</style>
		<?php endif;?>
  		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		  	<td width="11%" align="left"><input type="checkbox" name="check_dis" id="check_dis" <?php if($this->arrField['check_dis']=='1'){echo "checked='checked'";}?> value="1"><label for="check_dis" class="span-text">Hiển thị top</label></td>
		    <td width="11%" align="left"><input type="checkbox" name="check_km" id="check_km" onclick="checkKhuyenMai()" <?php if($this->arrField['check_km']=='1'){echo "checked='checked'";}?> value="1"><label for="check_km" class="span-text">Khuyến mãi</label></td>
		    <td align="left" style="line-height:0px;">
		    	<span id="giakhuyenmai" class="span-text">Giá khuyến mãi :<input size="7" type="text" name="gia2" id="gia2" value="<?php echo $this->arrField['gia2'];?>">.000 VNĐ&nbsp;&nbsp;&nbsp;&loz;Thông tin: <input size="56" type="text" value="<?php echo $this->arrField['txtKM'];?>" name="txtKM" id=""txtKM></span>
		    </td>
		  </tr>
		</table>
  	</td>
  </tr>
  <tr>
     <td align="left" bgcolor="#FFFFCC">
     	<span class="span-text">Mô tả:</span><br />
     	<textarea name="mota" id="mota" cols="45" rows="5"><?php echo $this->arrField['mota'];?></textarea>
     </td>
   </tr>
   <?php if ($this->danhmucid > 1) :?>
	 <tr>
     <td align="left" bgcolor="#FFFFCC"><span class="span-text">Số lượng :</span><br /><input type="text" size="10" name="soluong" id="soluong" value="<?php echo $this->arrField['soluong'];?>" /></td>
  </tr>
  <?php endif;?>
   <input type="hidden" name="nameimage" value="<?php echo $this->tenFile; ?>" />
   <tr>
   	 <td valign="top" align="left" bgcolor="#FFFFCC"><img src="<?php echo FunctionCommon::getImage('img-the-min', $this->tenFile);?>" /><br />
   	     <input onclick="frmSubmit('m=sanpham&a=edit&iddm=<?php echo $this->iddm;?>&subiddm=<?php echo $this->subiddm;?>&by=<?php echo $this->by;?>&dis=<?php echo $this->dis;?>&back=<?php echo $this->back;?>&idSP=<?php echo $this->idSP;?><?php echo constants::$pathUrl;?>', '<?php echo $this->id; ?>', 'edit', 'delete')" type="button" name="delimage" id="delimage" value="Delete Image" style="cursor:pointer; color:#F00;" />
     </td>
   </tr>
   <tr>
   	 <td align="left" bgcolor="#FFFFCC"><span class="span-text">Hình ảnh :</span><br /><input type="file" name="code" id="code" size="50" />&nbsp;&nbsp;<input onclick="frmSubmit('m=sanpham&a=edit&iddm=<?php echo $this->iddm;?>&subiddm=<?php echo $this->subiddm;?>&by=<?php echo $this->by;?>&dis=<?php echo $this->dis;?>&back=<?php echo $this->back;?>&idSP=<?php echo $this->idSP;?><?php echo constants::$pathUrl;?>', '<?php echo $this->id; ?>', 'edit', 'upload')" type="button" name="uphinh" value="Upload Image"></td>
   </tr>
   <tr>
     <td align="center" bgcolor="#FFFFCC">
     	<table width="100%" border="0" cellpadding="0" cellspacing="6" class="fbutton">
    		<tr>
    			<td width="45%" align="right" class="fbutrg">
    				<?php if ($this->by == '111') :?>
    				<img onclick="window.location.assign('index.php?m=scategory&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?>&subiddm=<?php echo $this->subiddm;?><?php echo constants::$pathUrl;?>')" src="images/default/back.png" border="0" width="34" title="back"/>&nbsp;&nbsp;&nbsp;
    				<?php elseif ($this->dis == '1') :?>
    				<img onclick="window.location.assign('index.php?m=sanpham&a=display&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?>&subiddm=<?php echo $this->subiddm;?>&back=<?php echo $this->back;?><?php echo constants::$pathUrl;?>')" src="images/default/back.png" border="0" width="34" title="back"/>&nbsp;&nbsp;&nbsp;
    				<?php elseif($this->idSP != '') :?>
    				<img onclick="window.location.assign('index.php?m=home&a=index<?php echo constants::$pathUrl;?>')" src="images/default/back.png" border="0" width="34" title="back"/>&nbsp;&nbsp;&nbsp;
    				<?php else :?>
    				<img onclick="window.location.assign('index.php?m=sanpham&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?>&subiddm=<?php echo $this->subiddm;?><?php echo constants::$pathUrl;?>')" src="images/default/back.png" border="0" width="34" title="back"/>&nbsp;&nbsp;&nbsp;
    				<?php endif;?>
    			</td>
    			<td width="55%" align="left">&nbsp;&nbsp;&nbsp;<span onclick="frmSubmit('m=sanpham&a=edit&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?>&subiddm=<?php echo $this->subiddm;?>&by=<?php echo $this->by;?>&dis=<?php echo $this->dis;?>&back=<?php echo $this->back;?>&idSP=<?php echo $this->idSP;?><?php echo constants::$pathUrl;?>', '<?php echo $this->id; ?>', 'edit', 'edit')" class="fbutlf"><?php echo $this->tpl_button;?></span></td>
    		</tr>
    	</table>
     </td>
   </tr>
</table>
</form>

<?php if ($this->dialog) :?>
<div id="allconfirm">
	<div id="popup-diet" class="ui-popup-diet ui-body-e ui-corner-all" style="top: 216px;">
	<p>Thông tin được update</p>
	<?php if ($this->by == '111') :?>
	<a href="#" onclick="window.location.assign('index.php?m=scategory&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?><?php echo constants::$pathUrl;?>')">OK</a>
	<?php elseif ($this->dis == '1') :?>
	<a href="#" onclick="window.location.assign('index.php?m=sanpham&a=display&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?>&subiddm=<?php echo $this->subiddm;?>&back=<?php echo $this->back;?><?php echo constants::$pathUrl;?>')">OK</a>
	<?php elseif($this->idSP != '') :?>
	<a href="#" onclick="window.location.assign('index.php?m=home&a=index<?php echo constants::$pathUrl;?>')">OK</a>
	<?php else :?>
	<a href="#" onclick="window.location.assign('index.php?m=sanpham&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?>&subiddm=<?php echo $this->subiddm;?><?php echo constants::$pathUrl;?>')">OK</a>
	<?php endif;?>
	</div>
</div>
<?php endif;?>